<table width="1024" align="center" class="borda">
    <tr>
        <td>Digite um dado para busca:
            <form id="form1" name="form1" method="post" action="?menu=movimentacao">
                <label>
                    <input type="text" size="60" name="texto" id="texto" />
                </label>
                <label> </label>
                <input type="submit" name="buscar" id="buscar"  value="Buscar" />
            </form></td>
    </tr>
    <tr>
        <td height="120">
            <?php
            $nome = $_POST['texto'];
            if (isset($nome)) {
                require_once '../dao/MovimentacaoDaoImp.class.php';
                $dao = new MovimentacaoDaoImp();
                $result = $dao->buscarNome($nome);
            ?>
                <table width='1024' border="1">
                <?php
                foreach ($result as $row) {
                ?>
                    <tr>
                        <td><?php echo $row['idMovimentacao'] ?> </td>
                        <td><?php echo $row['requisicao'] ?> </td>
                        <td><?php echo $row['valor'] ?> </td>
                        <td><?php echo $row['date'] ?> </td>
                        <!-- func =  1 indica visualizar, func = 2 indica alterar e 3 indica deletar-->
                        <td><a href="?menu=movimentacao&func=1&id=<?php echo $row['idMovimentacao'] ?>">Visualizar</a> </td>
                        <td><a href="?menu=movimentacao&func=2&id=<?php echo $row['idMovimentacao'] ?>">Alterar</a> </td>
                        <td><a href="?menu=movimentacao&func=3&id=<?php echo $row['idMovimentacao'] ?>">Deletar</a> </td>
                    </tr>
                <?php
                }
                ?>
            </table>
            <?php
            }
            ?>
        </td>
    </tr>
</table>
